#!/bin/bash
# directory need to monitor 
DIR=/root/123/docs

# monitor $DIR  and do something
inotifywait -rmq -e "create,modify" $DIR --format "%w%f" | while read event
do
  curl -O https://www.baidu.com/img/bd_logo1.png
done
